This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
This only works for the case of a simple ASCII string that is represented as a string of hex. It does not work for UTF-8, UTF-16, or any other character set.
Public Function HexStr2Str(str1 As String) As String
' Converts string <str1> with hex values into regular string
' Assumes hex string is simple ASCII. Does not handle UTF-16 or UTF-8
' E.g. "414243" will be converted into "ABC"
Dim i As Integer
Dim b As Byte
Dim nChar As Integer
Dim str2 As String
nChar = Len(str1) \ 2
For i = 0 To nChar - 1
b = CInt("&H" & Mid(str1, i * 2 + 1, 2))
str2 = str2 + Chr(b)
Next
HexStr2Str = str2
End Function
-rich
Feedback response number WEBB8VK5AN created by ~Ned Nimfanakonyoopsi on 06/24/2012